package com.example.dou2204;

import android.app.Application;
import android.content.Context;
import android.util.Log;

import com.example.dou2204.roomdb.DataBaseUtils;
import com.tencent.rtmp.TXLiveBase;
import com.tencent.rtmp.TXLiveBaseListener;
import com.umeng.commonsdk.UMConfigure;
import com.umeng.socialize.PlatformConfig;

public class App extends Application {
    private static Context context;

    public static Context getContext() {
        return context;
    }

    @Override
    public void onCreate() {
        super.onCreate();
        context = getApplicationContext();
        UMConfigure.init(this, "5a12384aa40fa3551f0001d1", "umeng", UMConfigure.DEVICE_TYPE_PHONE, "");
        PlatformConfig.setQQZone("101830139","5d63ae8858f1caab67715ccd6c18d7a5");

        DataBaseUtils.getInstance().init(this);//在项目运行时，数据库被创建


        String licenceURL = "https://license.vod2.myqcloud.com/license/v2/1316816019_1/v_cube.license"; // 获取到的 licence url
        String licenceKey = "14c9c10e378d7088755398882da77572"; // 获取到的 licence key
        TXLiveBase.getInstance().setLicence(this, licenceURL, licenceKey);
        TXLiveBase.setListener(new TXLiveBaseListener() {
            @Override
            public void onLicenceLoaded(int result, String reason) {
                Log.i("sss", "onLicenceLoaded: result:" + result + ", reason:" + reason);
            }
        });

    }

}
